package com.stake.util;

import java.util.List;

import com.stake.entity.UserAnswers;

public class UserAnswerDescription {
	
	public String getAnswerDescription(Long questionId, UserAnswers answer){
		List<String> selectedOptions = answer.getOptionValues();
		StringBuilder builder = new StringBuilder();
		if(questionId.equals(1014l)){
			builder.append("Provides Service by <span class=\"boldfont\">");
			if(selectedOptions.contains("Both"))  return builder.append(" In-Person and Online</span>").toString();
			else if(selectedOptions.contains("In-person")) return builder.append(" In-Person</span>").toString();
			else if(selectedOptions.contains("Online")) return builder.append(" Online</span>").toString();
		} else if(questionId.equals( 1011l)){
			builder.append("Specific Subject for Course, Talk or Training include <span class=\"boldfont\">"); 
			builder.append(answer.getAnswer());
			builder.append("</span>");
			return builder.toString();
		} else if(questionId.equals(1010l)){
			builder.append("<span class=\"boldfont\">Other Details : </span><br>");
			builder.append("<span style=\"margin-left: 10px\" >" + answer.getAnswer() + " <span>"); 
			return builder.toString();
		}
		
		return null;
	}

}
